def merge_acl_table_and_counter(acl_tables, counters):
    """
    @summary: Merge the ACL counters data into the ACL tables dictionary.

    Counters of ACL rules are parsed from output of 'aclshow -a'. This function merges the counters of ACL rules
    into the ACL tables dict.

    @param acl_tables: The dict of ACL tables
    @param counters: The dict containing counters data of ACL rules
    @return: Return a dict of ACL tables containing ACL rules and counters
    """
    for counter in counters:
        table_name = counter['table_name']
        rule_name = counter['rule_name']
        if table_name in acl_tables:
            if rule_name in acl_tables[table_name]['rules']:
                acl_tables[table_name]['rules'][rule_name]['packets_count'] = counter['packets_count']
                acl_tables[table_name]['rules'][rule_name]['bytes_count'] = counter['bytes_count']

    return acl_tables