Add support for count() and strlen()
Finish merge from upstream