check access on template ifcount