Add selection.size. Fixes #1177.