<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count_group(group_id, failures=False, cached=Conf.CACHED):
 """ Count the results in a group. :param str group_id: the group id :param bool failures: Returns failure count if True :param bool cached: run this against the cache backend :return: the number of tasks/results in a group :rtype: int """

    if cached:
        return count_group_cached(group_id, failures)
    return Task.get_group_count(group_id, failures)