Solution
A lovely problem.
By reasoning: Some families have 1 pet rock. Half of the rest have 2. The other half of the rest have none. If each family having 2 were to give one of them to a family having none, then every family in Ware would have 1 pet rock. So there are 5000 pet rocks in Ware.
By algebra: If n families have 1, then (5000 - n) / 2 have 2. So the number of pet rocks is n + 2(5000 - n) / 2 = n + 5000 - n = 5000.