implementation of filter for completed, todo, all and count on categories