new plugin: layer-count

fixes #821
use predefined constants
Merge commit '2229454f8d04ad05c9e832f9f06cbc1cf4900412' into bookmarks