Added method to count all products in the database.