## Show total number of objects in database

Is there a way from either the command line or in the gui to show the total number of objects in the objects\_5\_0.C file? Specifically for R65 and R77.

Thx

[2\\
\\
\\
Kudos](https://community.checkpoint.com/t5/kudos/messagepage/board-id/codehub/message-id/3313/tab/all-users "Click here to see who gave kudos to this post.")

[Click here to give kudos to this post.](https://community.checkpoint.com/t5/forums/v5/forumtopicpage.kudosbuttonv2.kudoentity:kudoentity/kudosable-gid/50603?t:ac=board-id/codehub/message-id/3313/thread-id/3313&t:cp=kudos/contributions/tapletcontributionspage&ticket=8TnhtN15y2ZY_-1 "Click here to give kudos to this post.")

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

[Reply](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603)

- [All forum topics](https://community.checkpoint.com/t5/API-CLI-Discussion/bd-p/codehub/page/56 "API / CLI Discussion")
- [Previous Topic](https://community.checkpoint.com/t5/API-CLI-Discussion/Automation-Specialist-REST-API-Demo-Tool-not-working/td-p/49889 "Automation Specialist : REST API Demo Tool not working")
- [Next Topic](https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-Anti-Bot-Anti-Virus-are-set-to-Detect-only-on/td-p/50583 "How to check if Anti-Bot / Anti-Virus are set to Detect only on CLI ?")

1 Solution

Accepted Solutions

[JozkoMrkvicka](https://community.checkpoint.com/t5/user/viewprofilepage/user-id/1702)

Authority

‎2019-04-1101:55 PM

[Show option menu](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603# "Show option menu")

- Mark as New
- Bookmark
- Subscribe
- Mute
- [Subscribe to RSS Feed](https://community.checkpoint.com/rss/message?board.id=codehub&message.id=3314)
- [Permalink](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646/highlight/true#M3314)
- [Print](https://community.checkpoint.com/t5/forums/forumtopicprintpage/board-id/codehub/message-id/3314/print-single-message/true/page/1)
- [Report Inappropriate Content](https://community.checkpoint.com/t5/notifications/notifymoderatorpage/message-uid/50646)

[Jump to solution](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646#M3314)

Hi,

For SMS via CLI:

```markup
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("
```

For MDS via CLI:

```markup
mdsenv <DOMAIN_NAME>
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("
```

If needed, you can search for a specific table, like **network\_objects**(for all network objects) or **services**(for all services).

```markup
echo -n "There are ";cat $FWDIR/conf/objects_5_0.C | grep -c ":table (network_objects)" | tr -d "\n"; echo " network objects."
```

Output:

Kind regards,

**Jozko** Mrkvicka

[View solution in original post](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646#M3314)

[3\\
\\
\\
Kudos](https://community.checkpoint.com/t5/kudos/messagepage/board-id/codehub/message-id/3314/tab/all-users "Click here to see who gave kudos to this post.")

[Click here to give kudos to this post.](https://community.checkpoint.com/t5/forums/v5/forumtopicpage.kudosbuttonv2.kudoentity:kudoentity/kudosable-gid/50646?t:ac=board-id/codehub/message-id/3313/thread-id/3313&t:cp=kudos/contributions/tapletcontributionspage&ticket=8TnhtN15y2ZY_-1 "Click here to give kudos to this post.")

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

[Reply](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603)

3 Replies

[JozkoMrkvicka](https://community.checkpoint.com/t5/user/viewprofilepage/user-id/1702)

Authority

‎2019-04-1101:55 PM

[Show option menu](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603# "Show option menu")

[Jump to solution](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646#M3314)

Hi,

For SMS via CLI:

```markup
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("
```

For MDS via CLI:

```markup
mdsenv <DOMAIN_NAME>
cat $FWDIR/conf/objects_5_0.C | grep -c ":table ("
```

If needed, you can search for a specific table, like **network\_objects**(for all network objects) or **services**(for all services).

```markup
echo -n "There are ";cat $FWDIR/conf/objects_5_0.C | grep -c ":table (network_objects)" | tr -d "\n"; echo " network objects."
```

Output:

Kind regards,

**Jozko** Mrkvicka

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

[Reply](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603)

[J\_Saun](https://community.checkpoint.com/t5/user/viewprofilepage/user-id/13578)

Contributor

‎2019-04-1204:44 AM

[Show option menu](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603# "Show option menu")

- Mark as New
- Bookmark
- Subscribe
- Mute
- [Subscribe to RSS Feed](https://community.checkpoint.com/rss/message?board.id=codehub&message.id=3315)
- [Permalink](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50740/highlight/true#M3315)
- [Print](https://community.checkpoint.com/t5/forums/forumtopicprintpage/board-id/codehub/message-id/3315/print-single-message/true/page/1)
- [Report Inappropriate Content](https://community.checkpoint.com/t5/notifications/notifymoderatorpage/message-uid/50740)

[In response to JozkoMrkvicka](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646/highlight/true#M3314)

[Jump to solution](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646#M3314)

Thanks Jozko. That worked perfectly and was exactly what I needed.

[1\\
\\
\\
Kudo](https://community.checkpoint.com/t5/kudos/messagepage/board-id/codehub/message-id/3315/tab/all-users "Click here to see who gave kudos to this post.")

[Click here to give kudos to this post.](https://community.checkpoint.com/t5/forums/v5/forumtopicpage.kudosbuttonv2.kudoentity:kudoentity/kudosable-gid/50740?t:ac=board-id/codehub/message-id/3313/thread-id/3313&t:cp=kudos/contributions/tapletcontributionspage&ticket=8TnhtN15y2ZY_-1 "Click here to give kudos to this post.")

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

[Reply](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603)

[JozkoMrkvicka](https://community.checkpoint.com/t5/user/viewprofilepage/user-id/1702)

Authority

‎2019-04-1305:17 AM

[Show option menu](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603# "Show option menu")

- Mark as New
- Bookmark
- Subscribe
- Mute
- [Subscribe to RSS Feed](https://community.checkpoint.com/rss/message?board.id=codehub&message.id=3316)
- [Permalink](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50817/highlight/true#M3316)
- [Print](https://community.checkpoint.com/t5/forums/forumtopicprintpage/board-id/codehub/message-id/3316/print-single-message/true/page/1)
- [Report Inappropriate Content](https://community.checkpoint.com/t5/notifications/notifymoderatorpage/message-uid/50817)

[In response to J\_Saun](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50740/highlight/true#M3315)

[Jump to solution](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50646#M3314)

Glad that I helped 🙂

Another way is to use a command ['cpmiquerybin'](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk65181) which is capable to do more stuff like finding all network ranges, all TCP ports, all time objects and so on.

Kind regards,

**Jozko** Mrkvicka

0

Kudos

[Click here to give kudos to this post.](https://community.checkpoint.com/t5/forums/v5/forumtopicpage.kudosbuttonv2.kudoentity:kudoentity/kudosable-gid/50817?t:ac=board-id/codehub/message-id/3313/thread-id/3313&t:cp=kudos/contributions/tapletcontributionspage&ticket=8TnhtN15y2ZY_-1 "Click here to give kudos to this post.")

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

[Reply](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603)

Post Reply

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

| User | Count |
| --- | --- |
| <br>[Duane\_Toler](https://community.checkpoint.com/t5/user/viewprofilepage/user-id/694) | 2 |
| <br>[Maxim\_Tremblay](https://community.checkpoint.com/t5/user/viewprofilepage/user-id/685) | 1 |

[View All ≫](https://community.checkpoint.com/t5/forums/kudosleaderboardpage/board-id/codehub/timerange/one_month/page/1/tab/authors)

Trending Discussions

[Log hunting playbook for CVE-2026-16232](https://community.checkpoint.com/t5/API-CLI-Discussion/Log-hunting-playbook-for-CVE-2026-16232/td-p/280070)

[Query gateway version & take](https://community.checkpoint.com/t5/API-CLI-Discussion/Query-gateway-version-amp-take/td-p/280077)

[Getting Currently Active Remote Access VPN Users via Management API (PHP example)](https://community.checkpoint.com/t5/API-CLI-Discussion/Getting-Currently-Active-Remote-Access-VPN-Users-via-Management/td-p/279364)

Upcoming Events

Sort by:

- [All](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603#)
- [Virtual](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603#)
- [In-Person](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603#)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Tue 28 Jul 2026 @ 11:00 AM (EDT)

[Under the Hood - Check Point and Illumio – Modern Network Defense Against AI-Based Threats](https://community.checkpoint.com/t5/CheckMates-Events/Under-the-Hood-Check-Point-and-Illumio-Modern-Network-Defense/ev-p/279701)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Wed 29 Jul 2026 @ 12:00 PM (SGT)

[The AI Security Report 2026: A Turning Point for Enterprise Defense - SGT](https://community.checkpoint.com/t5/CheckMates-Events/The-AI-Security-Report-2026-A-Turning-Point-for-Enterprise/ev-p/280019)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Wed 29 Jul 2026 @ 02:00 PM (IDT)

[The AI Security Report 2026: A Turning Point for Enterprise Defense - AMER](https://community.checkpoint.com/t5/CheckMates-Events/The-AI-Security-Report-2026-A-Turning-Point-for-Enterprise/ev-p/280021)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Wed 29 Jul 2026 @ 03:00 PM (CEST)

[The AI Security Report 2026: A Turning Point for Enterprise Defense EMEA](https://community.checkpoint.com/t5/CheckMates-Events/The-AI-Security-Report-2026-A-Turning-Point-for-Enterprise/ev-p/280020)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Wed 29 Jul 2026 @ 11:00 AM (EDT)

[TechTalk: On-Premise SD-WAN Management](https://community.checkpoint.com/t5/CheckMates-Events/TechTalk-On-Premise-SD-WAN-Management/ev-p/279370)

Thu 30 Jul 2026 @ 11:30 AM (CDT)

[CheckMates Live DFW: Agentic AI Security Deep Dive & Hands-On](https://community.checkpoint.com/t5/CheckMates-Events/CheckMates-Live-DFW-Agentic-AI-Security-Deep-Dive-amp-Hands-On/ev-p/279920)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Tue 28 Jul 2026 @ 11:00 AM (EDT)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Wed 29 Jul 2026 @ 12:00 PM (SGT)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Wed 29 Jul 2026 @ 02:00 PM (IDT)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Wed 29 Jul 2026 @ 03:00 PM (CEST)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Wed 29 Jul 2026 @ 11:00 AM (EDT)

[TechTalk: On-Premise SD-WAN Management](https://community.checkpoint.com/t5/CheckMates-Events/TechTalk-On-Premise-SD-WAN-Management/ev-p/279370)

[Virtual](https://community.checkpoint.com/labels/Virtual)

Thu 30 Jul 2026 @ 10:00 AM (PDT)

[AI Security Masters E12: READY OR NOT: Securing the AI Enterprise 4/5 - AI Gateway](https://community.checkpoint.com/t5/CheckMates-Events/AI-Security-Masters-E12-READY-OR-NOT-Securing-the-AI-Enterprise/ev-p/277411)

[In-Person](https://community.checkpoint.com/labels/In-Person)

Tue 11 Aug 2026 @ 11:30 AM (EDT)

[New York City: Agentic AI Security Deep Dive & Hands-On](https://community.checkpoint.com/t5/CheckMates-Events/New-York-City-Agentic-AI-Security-Deep-Dive-amp-Hands-On/ev-p/279476)

[In-Person](https://community.checkpoint.com/labels/In-Person)

Thu 13 Aug 2026 @ 11:30 AM (EDT)

[Waltham, MA: Agentic AI Security Deep Dive & Hands-On](https://community.checkpoint.com/t5/CheckMates-Events/Waltham-MA-Agentic-AI-Security-Deep-Dive-amp-Hands-On/ev-p/279475)

[In-Person](https://community.checkpoint.com/labels/In-Person)

Thu 20 Aug 2026 @ 08:30 AM (COT)

[Medellin: Workspace Evolution: Hybrid Mesh Management - Visibilidad, Automatización e IA](https://community.checkpoint.com/t5/CheckMates-Events/Medellin-Workspace-Evolution-Hybrid-Mesh-Management-Visibilidad/ev-p/280003)

[In-Person](https://community.checkpoint.com/labels/In-Person)

Thu 20 Aug 2026 @ 06:00 PM (COT)

[Medellin: Workspace Intelligence: IA Generativa en Acción para Equipos de Seguridad](https://community.checkpoint.com/t5/CheckMates-Events/Medellin-Workspace-Intelligence-IA-Generativa-en-Acci%C3%B3n-para/ev-p/280004)

[In-Person](https://community.checkpoint.com/labels/In-Person)

Thu 27 Aug 2026 @ 09:00 AM (CEST)

[Check Point Hands-On SASE and Cloud Workshop - Zurich](https://community.checkpoint.com/t5/CheckMates-Events/Check-Point-Hands-On-SASE-and-Cloud-Workshop-Zurich/ev-p/279914)

[In-Person](https://community.checkpoint.com/labels/In-Person)

Wed 21 Oct 2026 @ 09:00 AM (BST)

[AI Security Workshop - Glasgow](https://community.checkpoint.com/t5/CheckMates-Events/AI-Security-Workshop-Glasgow/ev-p/278505)

[CheckMates Events](https://community.checkpoint.com/t5/CheckMates-Events/eb-p/events)

[Top](https://community.checkpoint.com/t5/API-CLI-Discussion/Show-total-number-of-objects-in-database/m-p/50603)

About CheckMates

- [Getting Started & FAQ](https://community.checkpoint.com/t5/help/faqpage)
- [Community Guidelines](https://community.checkpoint.com/t5/user/TermsOfServicePage)

Learn Check Point

- [Check Point for Beginners](https://community.checkpoint.com/t5/Check-Point-for-Beginners-2-0/bg-p/check-point-for-beginners-2-0)
- [Check Point Trivia](https://community.checkpoint.com/t5/Check-Point-Trivia/bg-p/trivia)
- [CheckFlix Videos](https://community.checkpoint.com/t5/CheckFlix/ct-p/checkflix)

Advanced Learning

- [Check Point Security Masters](https://community.checkpoint.com/t5/Check-Point-Security-Masters/gp-p/ccsm)
- [Tip of the Week](https://community.checkpoint.com/t5/SecureKnowledge-Tip-of-the-Week/bg-p/secureknowledge)
- [TechTalks](https://community.checkpoint.com/t5/TechTalks/ct-p/techtalks%20role=)
- [Training and Certification](https://community.checkpoint.com/t5/Training-and-Certification/bd-p/training-and-certification)

Resources

- [CheckMates Toolbox](https://community.checkpoint.com/t5/CheckMates-Toolbox/ct-p/CheckMatesToolbox)
- [Developers (Code Hub)](https://community.checkpoint.com/t5/Developers-API-CLI/bd-p/codehub)
- [Product Announcements](https://community.checkpoint.com/t5/Product-Announcements/bg-p/products-blog)
- [Upcoming Events](https://community.checkpoint.com/t5/Upcoming-Events/bg-p/checkmates-live)

Non-English Discussions

- [Español](https://community.checkpoint.com/t5/Espa%C3%B1ol/bd-p/spanish)
- [French](https://community.checkpoint.com/t5/Fran%C3%A7ais/bd-p/francais)
- [Japanese](https://community.checkpoint.com/t5/Japanese-%E6%97%A5%E6%9C%AC%E8%AA%9E/bd-p/Japanese)
- [Português](https://community.checkpoint.com/t5/Portugu%C3%AAs/bd-p/portuguese)
- [Russian](https://community.checkpoint.com/t5/Russian/bd-p/russian)
- [Chinese](https://community.checkpoint.com/t5/Chinese/bd-p/taiwan)

YOU DESERVE THE BEST SECURITY

We’re Social. Follow Us [CheckMates on LinkedIn](http://linkedin.com/company/cpcheckmates)  [Check Point on YouTube](https://www.youtube.com/user/CPGlobal) [CheckMates on Facebook](https://www.facebook.com/cpcheckmates/) [CheckMates on Instagram](https://www.instagram.com/cpcheckmates/)

©1994-2026 Check Point Software Technologies Ltd. All rights reserved. [Copyright](https://www.checkpoint.com/copyright/) [Privacy Policy](https://www.checkpoint.com/privacy/) [About Us](https://www.checkpoint.com/about-us/) [UserCenter](https://usercenter.checkpoint.com/)

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
