Yes it's the the count of bytes written:
```
val stream = new java.io.ByteArrayOutputStream(1000)
stream.write(-1)
stream.size
res1: Int = 1
```