I think you are on to something about plants that got deleted from the database, still being counted in your list but not visible since the plant itself is gone.
Your plant list is really just a pile of numbers: it matches the Plant ID of the plants in the database. So on your profile I just count up how many plant IDs you have in each category. Then when you go into a category to view the actual plants, it pulls down the list of plant IDs and then goes into the database to get the info on each plant. If there is no matching plant then it simply doesn't display it.
The solution, I guess, is to do the matching on your profile page, as well.