"""This module provides plugins for NEU metrics."""

import kurt
from hairball.plugins import HairballPlugin


class Variables(HairballPlugin):

    """Plugin that counts the number of variables in a project."""

    def __init__(self):
        super(Variables, self).__init__()
        self.total = 0

    def finalize(self):
        """Output the number of variables in the project."""
        print("Number of variables: %i" % self.total)

    def analyze(self, scratch):
        """Run and return the results of the Variables plugin."""          
        self.total = len(scratch.variables)
        for x in scratch.sprites:
            self.total += len(x.variables)

Add Variables class