started with a count function