Only the stored templates are calculated in the 5 templates limit. The "anonymous" templates sent through API doesn't count.