def _extended_N(self):
N = self.cmap.N + <NUM_LIT:1><EOL>if self.extend == '<STR_LIT>':<EOL><INDENT>N += <NUM_LIT:2><EOL><DEDENT>elif self.extend in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>N += <NUM_LIT:1><EOL><DEDENT>return N<EOL>
Based on the colormap and extend variable, return the
number of boundaries.