Similar Items: On counting subgroups for a class of finite nonabelian p-groups and related problems