Change record status: 
Project: 
Introduced in branch: 
9.3.x
Introduced in version: 
9.3.0
Description: 

Source plugins can now cache the count by using the doCount() method. This affects any source plugin which extends SourcePluginBase and has a count() method. Implementing the count() method overrides \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::count() which has the caching logic. Convert your count() method to doCount() to benefit from the caching.

NOTE: this is not technically an API change. It was always designed to work this way. But prior to #3190815: Source count caching broken: impossible to enable source count caching for SqlBase-based source plugins (plus, unneeded cache I/O), every source plugin subclassing SqlBase or DrupalSqlBase (which is the vast majority of them) was not getting the automatic source count caching, because SqlBase::count() had been overriding SourcePluginBase::count()!

Before
  /**
   * {@inheritdoc}
   */
  public function count($refresh = FALSE) {
    ...
  }
After
  /**
   * {@inheritdoc}
   */
  protected function doCount() {
    ...
  }
Impacts: 
Module developers