Fixed count function