Adds function to get todo count