Calculate the total number of specs for non-nested and nested specs