fixed a couple of bugs also now supports count in text selection