title: Return total count of rows in ResultMap with myBatis
body: <p>I create for this extended ResultMap with 2 additional fields rowNumber and totalRows. Yes, now I have total rows count, but it stores in every object from result map.</p>
  
  <pre><code>&lt;resultMap id="BaseResultMapPagination" type="com.example.emaildto.EmailScheduleDTO" extends="BaseResultMap"&gt;
    &lt;result property="rowNumber" column="row_number"/&gt;
    &lt;result property="totalRows" column="total_count"/&gt;
  &lt;/resultMap&gt;
  &lt;select id="selectByExamplePagination" resultMap="BaseResultMapPagination" parameterType="com.example.emailservice.model.EmailScheduleCriteria"&gt;
  WITH t as (
      select row_number() OVER(&lt;include refid="orderByPagination"/&gt;) as row_number, 
      count(*) OVER () as total_count,
      * from EmailSchedule t
       &lt;if test="_parameter != null" &gt;
           &lt;include refid="Example_Where_Clause" /&gt;
       &lt;/if&gt;
  )
  select * from t where row_number &amp;gt;= #{pageInfo.startRow} AND row_number &amp;lt; #{pageInfo.endRow}
  order by row_number ASC
  &lt;/select&gt;
  </code></pre>
  
  <p>How can I get around this?</p>