Updated count function00