Logstash 2.1 error on greater than

Hi guys,

My logstash crash after I upgrade from 1.5 to 2.1 with the bellow error:

NoMethodError: undefined method `>' for nil:NilClass
output_func at (eval):529
outputworker at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.0-java/lib/logstash/pipeline.rb:276
start_outputs at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.0-java/lib/logstash/pipeline.rb:193

if "metric" in [tags] {
if [events.count] > 3 {
stdout {
codec => line {
format => "rate: %{events.count} "
}
}
}
}

Looks like the problem was with the DOT field name. I had to update my config

if "metric" in [tags] {
if [events][count] >= 3 {
stdout {
codec => line {
format => "rate: %{[events][count]}"
}
}
}
}