final version of the count