Fix for issue with direct value in counters

It appears that counted values may contain direct values instead of
range names which can break node generation. This commit fixes
the problem and also makes code a little more PEP8 compatible.
Also it contains a fix for erroneous inlined paramter expansion.

PROD-30700

Change-Id: Ib6fddc4a8181df9813d98f28f776e1185e455535
1 file changed