Ah! The function name was a different case to the one specified in the xml - fixed.  Also added counter increment