When doing quantities it always ends up as a custom routine, there is so many different variables and user requirements that creep in, you have asked for 1, a solution is offered and the final working version can be like 8 attempts later taking a lot of time and effort.
I know I have a count blocks but up to 5 levels deep in terms of the block details. The visibility and block name has used 2.
In saying so if your happy to be patient and provide all details up front a solution can be offered maybe a donation required. As mentioned people offering solution hate, I want extra, I want extra, I want extra.