added query and count to widget.rb
added default rake task and fixed an== typo