Use Beanshell Post-Processor, inside the sample you want its body length, with the code below:
response = prev.getResponseDataAsString();
data_length = new Integer(response.length());
vars.put("data_length", data_length.toString());
Then, you can use ${data_length} variable as desired.
