debugging for trace type error (stream.count)