Title: Counting relationship elements
Last modified: May 25, 2019

---

# Counting relationship elements

 *  Resolved [beevera](https://wordpress.org/support/users/beevera/)
 * (@beevera)
 * [7 years ago](https://wordpress.org/support/topic/counting-relationship-elements/)
 * Hi,
    I have a pod template of Pod A, which has a relationship to B (A has many
   B), so the field is named Bs. So in the template, if I do `{@Bs}` this will show:`
   B1 and B2...` But I’d like to show the total number of Bs. If I do `{@Bs._total}`
   or `{@Bs._total_found}`there’s nothing shown. Do you have any ideas? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Jim True](https://wordpress.org/support/users/jimtrue/)
 * (@jimtrue)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/counting-relationship-elements/#post-11590730)
 * Neither, `_total` or `_total_found` are legal magic tag helper functions. Nice
   try, but we typically document stuff like that.
 * You can, however, use the php function `count` against the relationship field,
   like `{@related_item,count}`
 *  Thread Starter [beevera](https://wordpress.org/support/users/beevera/)
 * (@beevera)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/counting-relationship-elements/#post-11596013)
 * Hi Jim, as usual, there’s always the solution with you! Thank you alot!
 *  Plugin Contributor [Jim True](https://wordpress.org/support/users/jimtrue/)
 * (@jimtrue)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/counting-relationship-elements/#post-11631949)
 * You’re welcome! I try 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Counting relationship elements’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jim True](https://wordpress.org/support/users/jimtrue/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/counting-relationship-elements/#post-11631949)
 * Status: resolved